High Performance Code Generation through Lazy Activation Records
نویسندگان
چکیده
For call intensive programs, function calls are major bottlenecks during program execution since they usually force register contents to be spilled into memory. Such register to memory spills are much more pronounced in presence of recursion. A function call is usually accompanied by the creation of its activation record at function entry. In this paper, we will deviate from this usual practice; we create an activation record only when we find it necessary. The result is that on many occasions we can execute a function call without actually creating its activation record. We call our strategy lazy activation record strategy (LARS) and show how this strategy is particularly important for call–intensive programs. The LARS subsumes many traditional techniques like leaf-call optimization and tailrecursion optimization, and in addition, it extends Chow’s shrink-wrapping in terms of scope and granularity. We also demonstrate how the LARS can be an effective optimization strategy in case of battery operated embedded systems, since not only it can reduce execution time but also
منابع مشابه
Code Versioning and Extremely Lazy Compilation of Scheme
Dynamically typed languages ensure safety through the use of type checks performed at run time. Static type inference has been used to remove type checks but this approach is limited in the absence of code duplication. This paper describes an alternate approach that generates multiple versions of the code to specialize it to the types that are observed at execution time by using an extremely la...
متن کاملSimple and Effective Type Check Removal through Lazy Basic Block Versioning
Dynamically typed programming languages such as JavaScript and Python defer type checking to run time. In order to maximize performance, dynamic language VM implementations must attempt to eliminate redundant dynamic type checks. However, type inference analyses are often costly and involve tradeoffs between compilation time and resulting precision. This has lead to the creation of increasingly...
متن کاملCode Generation for Mercury
Mercury is a new purely declarative logic programming language that requires programmers to write declarations for every predicate in the program. Although the main motivation for this requirement is that it allows the compiler to catch most programmer errors, it also allows the Mercury code generator to rely on the presence of type, mode and determinism information about every predicate in the...
متن کاملTarget code generation from G-machine code
The G-machine is a stack machine for von-Neumann-like execution of lazy functional languages, using graph reduction. This paper describes how target code generation from G-machine code is performed in a compiler for Lazy ML. We brieey review the G-machine, and the compiler phases preceding the target code generation. Two diierent target code generation methods are described, as well as essentia...
متن کاملLazy Symbolic Execution through Abstraction and Sub-space Search
We present an approach to address a main performance bottleneck in symbolic execution. Despite a powerful method to produce test cases with high coverage, symbolic execution often suffers from the problem of exploring a huge number of paths without (1) significantly increasing the coverage, and (2) going deep enough to hit hot spots. The situation becomes worse for modern programming languages ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2003